package stringjoinerdemo;

import java.util.StringJoiner;

public class StringJoinerDemo2 {
    public static void main(String[] args) {
        StringJoiner sj = new StringJoiner(", ","[","]");

        sj.add("1").add("2").add("3");
        System.out.println(sj);
        int len = sj.length();
        System.out.println(len);

        String s = sj.toString();
        System.out.println(s);
    }
}
